package com.oig.base.api;


import com.oig.base.api.factory.PortServiceFallBackFactory;
import com.oig.sys.base.dto.PortDto;
import com.oig.sys.base.vo.PortVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(contextId="portService", value="sys-base-server",path="/port",fallbackFactory= PortServiceFallBackFactory.class)
public interface PortService {

    //@Operation(summary = "根据名称及数据所属组织获取港口")
    @PostMapping(value = "/getByName")
    PortVo getByName(@RequestParam("name") String name);

    //@Operation(summary = "根据原code获取港口")
    @PostMapping(value = "/getByOldCode")
    PortVo getByOldCode(@RequestParam("oldCode") String oldCode);

    //@Operation(summary = "根据code获取港口")
    @PostMapping(value = "/getByCode")
    PortVo getByCode(@RequestParam("code") String code);

    //@Operation(summary = "修改口岸")
    @PostMapping(value = "/updatePort")
    PortVo updatePort(@RequestBody PortDto portDto) ;

}
